' ---------------------------------------------------------------------------
' E' bene "indentare" correttamente
'  per capire dove iniziano e dove finiscono le strutture
'  e anche per evitare errori
'  e anche per migliorare la visibilit
' ---------------------------------------------------------------------------
' Per indentare si selezionano le righe che vanno spostate a destra
' si fa tasto destro si di loro e si sceglie "Indent"
' Per spostarle a sinistra si sceglie "Unindent"
' ---------------------------------------------------------------------------
' Oppure al posto di queste di "Indent" e "Unindent" si possono usare i tasti
' (TAB per spostare a destra e SHIFT-TAB per spostare a sinistra)
' ---------------------------------------------------------------------------
' Ad ogni apertura di struttura (Label o IF) si indenta a destra
' e ad ogni fine di struttura o, ad esempio, EndIf si torna a sinistra
' ---------------------------------------------------------------------------

Button 1 Text start
Button 2 Text pezzok
Button 3 Text scarto
Button 4 Text Stop

Label start
	If Slot(4)> 500
		GoSub pezzok
	Else
		If Slot (5) > 500
			GoSub scarto
		EndIf
	EndIf			
GoTo start

Label pezzok
	Wait Slot (4)> 500
	Slot 1 = 350
	Wait Seconds 0.2
	Slot 2 = 800
	Wait Seconds 0.3
	Slot 3 = 750
	Wait Seconds 0.3
	Slot 3 = 200
	Slot 2 = 200
	Wait Seconds 0.5
	Slot 1 = 80
	Wait Seconds 0.05
	Slot 3 = 700
	Slot 2 = 910
	Wait Seconds 0.05
	Slot 3 = 540
	Wait Seconds 0.1
	Slot 2 = 200
	Slot 3 = 200
	Wait Seconds 0.1
	Slot 1 = 400
	Wait Seconds 0.2
Return


Label scarto
	Wait Slot (5) > 500
	Slot 1 = 550
	Wait Seconds 0.2
	Slot 2 = 800
	Wait Seconds 0.2
	Slot 3 = 750
	Wait Seconds 0.3
	Slot 3 = 200
	Slot 2 = 200
	Wait Seconds 0.5
	Slot 1 = 800
	Wait Seconds 0.05
	Slot 3 = 700
	Slot 2 = 910
	Wait Seconds 0.05
	Slot 3 = 540
	Wait Seconds 0.1
	Slot 2 = 200
	Slot 3 = 200
	Wait Seconds 0.1
	Slot 1 = 400
	Wait Seconds 0.2
Return
GoTo start   ' <-- togliere questo goto start - non agisce perch  dopo il return


Label Stop
	Wait Seconds 0.2
	Slot 2 = 200
	Wait Seconds  0.2
	Slot 3 = 200
	Wait Seconds 0.2
	Slot 1 = 400
Stop
